package cn.kgc.spring.day02.entity;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author 课工场
 * @date 2024/11/6
 * @description  该类中演示通过value注解实现不同类型属性的赋值操作
 */
@Component
@Data
public class Aoo {


    @Value("1")
    private Integer id;
    @Value("hello")
    private String  info;
    @Value("2024/11/06")
    private Date birth;

    @Value("#{'tom,jack,xiaoming'.split(',')}")
    private String[] message;
    @Value("#{'1,2,3'.split(',')}")
    private List<Integer> ids;
    @Value("#{'tom,jack,xiaoming,tom'.split(',')}")
    private Set<String> sts;
    @Value("#{{'username':'root','password':'root','driver':'com.mysql.jdbc.Driver'}}")
    private Map<String,String> mp;

}
